<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS定位-相对定位 (relative)</title>
    <style>
      div {
        width: 200px;
        height: 200px;
        border: 10px solid black;
        margin: 10px auto;
        /* position: static; */
      }
      .relative {
        /* 相对自己静态定位的位置，上下左右移动 */
        position: relative;
        top: 100px;
        left: 100px;
      }
    </style>
  </head>
  <body>
    <div>静态定位</div>
    <div class="relative">相对定位</div>
  </body>
</html>
